﻿using System.IO;
using System.Text;
using WebSocketSharp.Server;

namespace WbSocket.Winform
{
    internal class ApiRequest : BaseRequest
    {
        public ApiRequest(HttpRequestEventArgs ee) : base(ee)
        {
            ee.Response.ContentType = "application/json";
            ee.Response.ContentEncoding = Encoding.UTF8;
        }
        public override byte[] GetResponseContent()
        {
            if(UrlPath.Contains("/api/user/loginout")) return new User().Logout();
            return base.GetResponseContent();
        }
    }
}